﻿#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;

/*			    
    c++的io流
	基本接口：								ios_base -> ios
	标准IO		istream(标准输入流)										ostream(标准输出流)			 streambuf(缓冲流)
	实现： ifstream   istringstraem       iostream(cin\cout...)		  ofstream   ostringstream		filebuf  stringbuf
		  (文件输入流)(字符串输入流)		    (标准输入输出流)			（文件输出流）(字符串输出流)		(文件缓冲)(字符串缓冲)
										 fstream	  sstream
									  (文件输入输出)(字符串输出输出)
	

*/									

static int cin_stream() {
	char c_str[24];
	cin >> c_str;
	cout << c_str << endl;
	return 1;
}
class cin_out_stu {
private:
	string name;
	int score;
public:
	friend istream& operator>>(istream& in, cin_out_stu& stu);
	friend ostream& operator<<(ostream& out, cin_out_stu& stu);
};
istream& operator>>(istream& in, cin_out_stu& stu) {
	in >> stu.name >> stu.score;
	return in;
}
ostream& operator<<(ostream& out, cin_out_stu& stu) {
	out << "name : " << stu.name << " score : " << stu.score << endl;
	return out;
}
static int cin_out() {
	cin_out_stu stu;
	cin >> stu;
	cout << stu;
	return 1;
}
//文件读取
static int file_reader() {
	return 1;
}
static int file_writer() {
	return 1;
}

/// <summary>
/// 高级教程
/// </summary>
/// <param name=""></param>
/// <returns></returns>
int main(void) {
	return cin_out();
}
